﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DichVuManager.ascx.cs"
    Inherits="BONSAI.Admin.UC.DichVuManager" %>
    <%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
<style type="text/css">
    .style1
    {
        width: 193px;
    }
    .style2
    {
        width: 193px;
        height: 27px;
    }
    .style3
    {
        height: 27px;
    }
</style>
<table cellpadding="0" cellspacing="0" width="100%" style="padding-top: 10px; padding-left: 5px;
    padding-right: 5px;">
    <tr>
        <td style="padding-left: 4px; padding-right: 4px;">
            <img src="Image2/lua.png" />
            <span style="font-weight: bold; font-size: 10pt;">CẬP NHẬT DỊCH VỤ</span>            
            <hr />
        </td>
    </tr>
    <tr>
        <td align="left" style="height: 40px; background-color: #f5f1ea;" class="tdfuncyion">
             <br />
            <table cellpadding="0" cellspacing="0" style="width: 100%; margin-left: 5px;">
                <tr>
                    <td align="left" class="style2" >
                       Mã dịch vụ:
                    </td>
                    <td class="style3">
                        <asp:TextBox Enabled="false" ID="txtma" CssClass="textboxA" runat="server" 
                            Width="220px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="left" class="style2" >
                       dịch vụ Tiếng Việt:
                    </td>
                    <td class="style3">
                        <asp:TextBox ID="txtfactTV" CssClass="textboxA" runat="server" 
                            Width="420px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                  <td class="style2">
                    dịch vụ Tiếng Anh:
                  </td>
                  <td class="style3">
                    <asp:TextBox ID="txtfactEN" CssClass="textboxA" runat="server" Width="420px"></asp:TextBox>
                  </td>
                </tr>
                <tr>
                  <td class="style2">
                    Loại dịch vụ:
                  </td>
                  <td class="style3">
                      <asp:DropDownList ID="dropLoaiFact" runat="server">
                      </asp:DropDownList>
                  </td>
                </tr>
                <tr>
                   <td style="height:10px">
                   
                   </td>
                </tr>
                <tr>
                  <td class="style1">
                  
                  </td>
                  <td>
                      
                      
                      <asp:Button ID="bthemmoi" CssClass="buttonA"  runat="server" Text="Thêm mới" onclick="bthemmoi_Click" 
                          />
                          
                       <asp:Button ID="btcapnhat" CssClass="buttonA"  runat="server" Text="Cập nhật" onclick="btcapnhat_Click1" 
                           />
                          <br />
                          <br />
                  </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td style="height: 10px;">
        </td>
    </tr>
    <tr>
        <td valign="top" align="left">
            <fieldset>
                <legend style="color: Blue;">DANH SÁCH DỊCH VỤ
                    </legend>
                <br />
                Chọn loại dịch vụ : 
                <asp:DropDownList AutoPostBack="true" ID="droploaiFactF" runat="server" 
                    onselectedindexchanged="droploaiFactF_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
                
                <asp:GridView Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="Black" EmptyDataText="Không tìm thấy dữ liệu !" DataKeyNames="ID"
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                    AllowPaging="True" PageSize="20" OnPageIndexChanging="GridView1_PageIndexChanging"
                    OnRowDeleting="GridView1_RowDeleting" onrowediting="GridView1_RowEditing" 
                    >
                    <RowStyle HorizontalAlign="Left" />
                    <Columns>
                        <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderText="">
                            <HeaderTemplate>
                                <input id="changeCheckStateId" title="Chọn tất cả." onclick="changeCheckState(this.checked);"
                                    runat="server" type="checkbox" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input disabled="disabled" type="checkbox" value='<%#Eval("ID")%>' id="checkBox"
                                    runat="server" />
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderText="ID">
                            <ItemTemplate>
                                <span>
                                    <%#Eval("ID")%>
                                </span>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" 
                            HeaderText="Dịch vụ Tiếng Việt">
                           
                            <ItemTemplate>                               
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("DichVu") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderStyle-HorizontalAlign="Left" HeaderText="dịch vụ Tiếng Anh">
                           
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("DichVuEn") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>                       
                        
                        
                        <asp:CommandField HeaderImageUrl="~/Admin/ImageAdmin/icon2.png" CancelText="Thoát" EditText="Chỉnh sửa" ShowEditButton="True" 
                            UpdateText="Cập nhật" />
                        <asp:TemplateField ShowHeader="False">
                            <HeaderTemplate>
                                <img style="width: 20px; height: 20px;" src="ImageAdmin/edit-cut.png" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:LinkButton OnClientClick="return ConformDelete()" ID="LinkButton1" runat="server"
                                    CausesValidation="False" CommandName="Delete" Text="Xóa"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <HeaderStyle BackColor="Gray" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" />
                    <AlternatingRowStyle HorizontalAlign="Left" />
                </asp:GridView>
            </fieldset>
        </td>
    </tr>
</table>
<input type="hidden" id="hdc" value="false" />

<script language="javascript" type="text/jscript">
    function ConformDeleteTC()
    {
       var ch = document.getElementById("hdc");
       if(ch.value=="false")
       {
          alert("Bạn phải chọn nội dung muốn xóa.");
          return false;
       }       
       return window.confirm("Bạn có chắc bạn muốn xóa tất cả nội dung này không?");
    }
</script>

<script language="javascript" type="text/javascript">
    function DeleteAllV2()
    {
       
       var ch = document.getElementById("hdc");
       if(ch.value=="false")
       {
          alert("Bạn phải chọn nội dung muốn xóa.");
          //return cancelEvent();
       }       
       else
       {
             if(window.confirm("Bạn có chắc bạn muốn xóa tất cả nội dung này không?")==true)
             {                 
                 //var id = GetPara('id');                
                
                 location.href = "FaceStudentManager.aspx?zxc=1qwertyuiop";
             }                  
        }
    }
    function KetQua(kq)
    {
       //alert(kq);
    }
</script>

